[XEN][POWERPC] Remove pfn2mfn() now that it is understood
authorJimi Xenidis <jimix@watson.ibm.com>
Tue, 10 Oct 2006 13:09:38 +0000 (09:09 -0400)
committerJimi Xenidis <jimix@watson.ibm.com>
Tue, 10 Oct 2006 13:09:38 +0000 (09:09 -0400)
It is possible (thank you xm-test) to initiate a grant copy to a page
belonging to a dying domain, the page end up being owned by nobody
which is what the original test asserted.
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : z%F3cm%A4%B9U%E5V%AF%19%AF%91%B063%B5e%CC%E2

xen/arch/powerpc/mm.c

index 7d38872d7d835742bff0195d676455469d2a1337..8a91cbe51dbd5f4cf2e3674b99308fd50b50e7d1 100644 (file)
@@ -412,7 +412,18 @@ ulong pfn2mfn(struct domain *d, ulong pfn, int *type)
                 }
             }
         }
-        BUG_ON(t != PFN_TYPE_NONE && page_get_owner(mfn_to_page(mfn)) != d);
+#ifdef DEBUG
+        if (t != PFN_TYPE_NONE &&
+            (d->domain_flags & DOMF_dying) &&
+            page_get_owner(mfn_to_page(mfn)) != d) {
+            printk("%s: page type: %d owner Dom[%d]:%p expected Dom[%d]:%p\n",
+                   __func__, t,
+                   page_get_owner(mfn_to_page(mfn))->domain_id,
+                   page_get_owner(mfn_to_page(mfn)),
+                   d->domain_id, d);
+            BUG();
+        }
+#endif
     }
 
     if (t == PFN_TYPE_NONE) {